 const fs = require('fs')
// fs.readFile('./fs1.txt',(err,data)=>{
//   console.log(data.toString())
// })
function mineReadFile(path){
  return new Promise((resolve,reject)=>{
    fs.readFile(path,(err,data)=>{
      if (err){
        reject(err)
      }
      resolve(data.toString())
    })
  })
} 
mineReadFile('./fs1.txt').
then((val)=>{
  console.log(val)
  return mineReadFile('./fs2.txt')
}).then((val)=>{
  console.log(val)
  return mineReadFile('./fs3.txt')
}).then((val)=>{
  console.log(val)
})